package com.itheima.Day11.printstream;

import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.io.PrintWriter;

public class Test {
    public static void main(String[] args) throws Exception {
        try(PrintStream ps = new PrintStream("D:\\javajc_ws\\javaEE\\src\\com\\itheima\\Day11\\printstream\\ceshi.txt");
        PrintWriter pw = new PrintWriter("D:\\javajc_ws\\javaEE\\src\\com\\itheima\\Day11\\printstream\\ceshi.txt");){
//        ps.println("hello world");
//        ps.println(123);
//        ps.println( true);
//        ps.println(12.345);
//        ps.println('a');
//        ps.println("张三");
//        ps.println("------------------------");
        pw.println(2222);
        pw.println(123);
        pw.println( true);
        pw.println(12.345);
        pw.println('a');
        pw.println("张三");
        pw.flush();
        pw.close();}
        catch (Exception e){
            e.printStackTrace();
        }
    }
}
